package com.example.test_system.service;

import com.example.test_system.mapper.QuestionMapper;
import com.example.test_system.model.Judge;
import com.example.test_system.model.MultipleChoice;
import com.example.test_system.model.Question;
import com.example.test_system.model.SingleChoice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class PaperService {

    @Autowired
    QuestionMapper questionMapper;

    public Map<String, List> getPaper(){
        // 10 judge
        // 20 single choice

        List<Judge> judgeList = questionMapper.getJudge();
        List<SingleChoice> singleChoiceList = questionMapper.getSingleChoice();
        List<MultipleChoice> multipleChoiceList = questionMapper.getMultipleChoice();

        Map<String, List> resList = new HashMap<>();
        resList.put("Judge", judgeList);
        resList.put("SingleChoice", singleChoiceList);
        resList.put("MultipleChoice", multipleChoiceList);
        return resList;
    }
}
